package com.marsoft.test.controller;

import com.marsoft.test.entity.GeneralGurantyContractEntity;
import com.marsoft.test.service.GuarantyContractService;
import com.marsoft.test.utils.ResultMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * @author FAN_c
 * @date 2021/5/13 14:24
 * @description
 */
@RestController
public class GuarantyContractController {

    @Autowired
    private GuarantyContractService guarantyContractService;


    @GetMapping("/GuarantyContract/{guarantyContractNo}")
    public ResultMap findGuarantyContractByNo(@PathVariable("guarantyContractNo") Integer guarantyContractNo){

        GeneralGurantyContractEntity guarantyContractByNo = guarantyContractService.findGuarantyContractByNo(guarantyContractNo);
        return ResultMap.ok().put("date",guarantyContractByNo);
    }
}
